/*
 * File      : bb_stack.h
 * This file is part of Black Bird Simulation Platform
 * Copyright 2013-2020 BB(Black Bird) Development Team.  
 * All rights reserved.
 *
 * Change Logs:
 * Date           Author       Notes
 * 2013-10-24     Holt         First Version
 */
#ifndef __BB_STACK_INCLUDE__
#define __BB_STACK_INCLUDE__
#include "bb_type.h"
struct bb_element
{
	void * x;
	struct bb_elemrnt *next;
};
typedef struct bb_element* elem_t;

struct bb_stack
{
	bb_base cnt;
	elem_t head;
};
typedef struct bb_stack* stack_t;

extern stack_t	bb_stack_new(void);
extern bb_bool	bb_stack_empty(stack_t stk);
extern void		bb_stack_push(stack_t stk,const void *x);
extern void*	bb_stack_pop(stack_t stk);
extern void		bb_stack_free(stack_t stk);
extern bb_bool  bb_stack_type(stack_t stk);
#endif